package org.monkey4j;

import org.junit.rules.MethodRule;
import org.junit.rules.TestRule;
import org.junit.runners.model.FrameworkMethod;
import org.junit.runners.model.Statement;

/**
 * {@link TestRule} implementation.
 * 
 * @author hillger.t
 */
public class MonkeyRule implements MethodRule {

	@Override
	public Statement apply(Statement originStatement, FrameworkMethod method, Object target) {

		
		StatementFactory factory = new StatementFactory(target.getClass());
		return factory.newRepetitiveStatement(target, originStatement);
	}
}
